home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
System7 tools
/
M
/
Mini Grinders™ 1.0.cpt
/
Lock It!
< prev
next >
Wrap
Text File
|
1991-03-01
|
633b
|
33 lines
program LockIt;
const
lockBit = 15;
var
fMessage: integer;
fCount: integer;
fLoop: integer;
fileInfo: AppFile;
fFndrInfo: FInfo
begin
CountAppFiles(fMessage, fCount);
if (fCount > 0) then
begin
for fLoop:= 1 to fCount do
begin
GetAppFiles(fLoop, fileInfo);
error:= GetFInfo(fileInfo.fName, fileInfo.vRefNum, fFndrInfo);
if (error <> noErr) then
begin
if (BTst(fFndrInfo.fdFlags, lockBit)) then
RstFLock(fileInfo.fName, fileInfo.vRefNum)
else
SetFLock(fileInfo.fName, fileInfo.vRefNum);
end;
ClrAppFiles(fLoop);
end;
end
else
SysBeep(1);
end.